package com.zr.model;
// Generated 2017-7-4 20:10:00 by Hibernate Tools 4.0.0

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Order generated by hbm2java
 */
@Entity
@Table(name = "order", catalog = "lms")
public class Order implements java.io.Serializable {

	private Integer orId;
	private Cargostatus cargostatus;
	private Employeeinformation employeeinformation;
	private Customer customer;
	private Ordertype ordertype;
	private Deliverypoint deliverypointByDpIdf;
	private Deliverypoint deliverypointByDpIds;
	private Cargotype cargotype;
	private String orDeliveryDate;
	private String orState;
	private String orRemarks;
	private String orSenderName;
	private String orSenderPhone;
	private String orSenderCompanyPhone;
	private String orSenderAddr;
	private String orRecipientName;
	private String orRecipientPhone;
	private String orRecipientCompanyPhone;
	private String orRecipientAddr;
	private Integer orCargoWeight;
	private Integer orCargoVolume;
	private String orItemName;
	private Integer orItemNumber;
	private Integer orInsuredValue;
	private Integer orPostage;
	private Integer orTotalCost;
	private String orPaymentMethod;
	private String orIssuanceDate;
	private String orstates;
	private Set<Cargoinformation> cargoinformations = new HashSet<Cargoinformation>(0);
	private Set<Cargostatus> cargostatuses = new HashSet<Cargostatus>(0);

	public Order() {
	}

	public Order(Cargostatus cargostatus, Employeeinformation employeeinformation, Customer customer,
			Ordertype ordertype, Deliverypoint deliverypointByDpIdf, Deliverypoint deliverypointByDpIds,
			Cargotype cargotype, String orDeliveryDate, String orState, String orRemarks, String orSenderName,
			String orSenderPhone, String orSenderCompanyPhone, String orSenderAddr, String orRecipientName,
			String orRecipientPhone, String orRecipientCompanyPhone, String orRecipientAddr, Integer orCargoWeight,
			Integer orCargoVolume, String orItemName, Integer orItemNumber, Integer orInsuredValue, Integer orPostage,
			Integer orTotalCost, String orPaymentMethod, String orIssuanceDate, String orstates,
			Set<Cargoinformation> cargoinformations, Set<Cargostatus> cargostatuses) {
		this.cargostatus = cargostatus;
		this.employeeinformation = employeeinformation;
		this.customer = customer;
		this.ordertype = ordertype;
		this.deliverypointByDpIdf = deliverypointByDpIdf;
		this.deliverypointByDpIds = deliverypointByDpIds;
		this.cargotype = cargotype;
		this.orDeliveryDate = orDeliveryDate;
		this.orState = orState;
		this.orRemarks = orRemarks;
		this.orSenderName = orSenderName;
		this.orSenderPhone = orSenderPhone;
		this.orSenderCompanyPhone = orSenderCompanyPhone;
		this.orSenderAddr = orSenderAddr;
		this.orRecipientName = orRecipientName;
		this.orRecipientPhone = orRecipientPhone;
		this.orRecipientCompanyPhone = orRecipientCompanyPhone;
		this.orRecipientAddr = orRecipientAddr;
		this.orCargoWeight = orCargoWeight;
		this.orCargoVolume = orCargoVolume;
		this.orItemName = orItemName;
		this.orItemNumber = orItemNumber;
		this.orInsuredValue = orInsuredValue;
		this.orPostage = orPostage;
		this.orTotalCost = orTotalCost;
		this.orPaymentMethod = orPaymentMethod;
		this.orIssuanceDate = orIssuanceDate;
		this.orstates = orstates;
		this.cargoinformations = cargoinformations;
		this.cargostatuses = cargostatuses;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "orId", unique = true, nullable = false)
	public Integer getOrId() {
		return this.orId;
	}

	public void setOrId(Integer orId) {
		this.orId = orId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "csId")
	public Cargostatus getCargostatus() {
		return this.cargostatus;
	}

	public void setCargostatus(Cargostatus cargostatus) {
		this.cargostatus = cargostatus;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "eiId")
	public Employeeinformation getEmployeeinformation() {
		return this.employeeinformation;
	}

	public void setEmployeeinformation(Employeeinformation employeeinformation) {
		this.employeeinformation = employeeinformation;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "customerId")
	public Customer getCustomer() {
		return this.customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "otId")
	public Ordertype getOrdertype() {
		return this.ordertype;
	}

	public void setOrdertype(Ordertype ordertype) {
		this.ordertype = ordertype;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "dpIdf")
	public Deliverypoint getDeliverypointByDpIdf() {
		return this.deliverypointByDpIdf;
	}

	public void setDeliverypointByDpIdf(Deliverypoint deliverypointByDpIdf) {
		this.deliverypointByDpIdf = deliverypointByDpIdf;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "dpIds")
	public Deliverypoint getDeliverypointByDpIds() {
		return this.deliverypointByDpIds;
	}

	public void setDeliverypointByDpIds(Deliverypoint deliverypointByDpIds) {
		this.deliverypointByDpIds = deliverypointByDpIds;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "cyId")
	public Cargotype getCargotype() {
		return this.cargotype;
	}

	public void setCargotype(Cargotype cargotype) {
		this.cargotype = cargotype;
	}

	@Column(name = "orDeliveryDate")
	public String getOrDeliveryDate() {
		return this.orDeliveryDate;
	}

	public void setOrDeliveryDate(String orDeliveryDate) {
		this.orDeliveryDate = orDeliveryDate;
	}

	@Column(name = "orState")
	public String getOrState() {
		return this.orState;
	}

	public void setOrState(String orState) {
		this.orState = orState;
	}

	@Column(name = "orRemarks")
	public String getOrRemarks() {
		return this.orRemarks;
	}

	public void setOrRemarks(String orRemarks) {
		this.orRemarks = orRemarks;
	}

	@Column(name = "orSenderName")
	public String getOrSenderName() {
		return this.orSenderName;
	}

	public void setOrSenderName(String orSenderName) {
		this.orSenderName = orSenderName;
	}

	@Column(name = "orSenderPhone")
	public String getOrSenderPhone() {
		return this.orSenderPhone;
	}

	public void setOrSenderPhone(String orSenderPhone) {
		this.orSenderPhone = orSenderPhone;
	}

	@Column(name = "orSenderCompanyPhone")
	public String getOrSenderCompanyPhone() {
		return this.orSenderCompanyPhone;
	}

	public void setOrSenderCompanyPhone(String orSenderCompanyPhone) {
		this.orSenderCompanyPhone = orSenderCompanyPhone;
	}

	@Column(name = "orSenderAddr")
	public String getOrSenderAddr() {
		return this.orSenderAddr;
	}

	public void setOrSenderAddr(String orSenderAddr) {
		this.orSenderAddr = orSenderAddr;
	}

	@Column(name = "orRecipientName")
	public String getOrRecipientName() {
		return this.orRecipientName;
	}

	public void setOrRecipientName(String orRecipientName) {
		this.orRecipientName = orRecipientName;
	}

	@Column(name = "orRecipientPhone")
	public String getOrRecipientPhone() {
		return this.orRecipientPhone;
	}

	public void setOrRecipientPhone(String orRecipientPhone) {
		this.orRecipientPhone = orRecipientPhone;
	}

	@Column(name = "orRecipientCompanyPhone")
	public String getOrRecipientCompanyPhone() {
		return this.orRecipientCompanyPhone;
	}

	public void setOrRecipientCompanyPhone(String orRecipientCompanyPhone) {
		this.orRecipientCompanyPhone = orRecipientCompanyPhone;
	}

	@Column(name = "orRecipientAddr")
	public String getOrRecipientAddr() {
		return this.orRecipientAddr;
	}

	public void setOrRecipientAddr(String orRecipientAddr) {
		this.orRecipientAddr = orRecipientAddr;
	}

	@Column(name = "orCargoWeight")
	public Integer getOrCargoWeight() {
		return this.orCargoWeight;
	}

	public void setOrCargoWeight(Integer orCargoWeight) {
		this.orCargoWeight = orCargoWeight;
	}

	@Column(name = "orCargoVolume")
	public Integer getOrCargoVolume() {
		return this.orCargoVolume;
	}

	public void setOrCargoVolume(Integer orCargoVolume) {
		this.orCargoVolume = orCargoVolume;
	}

	@Column(name = "orItemName")
	public String getOrItemName() {
		return this.orItemName;
	}

	public void setOrItemName(String orItemName) {
		this.orItemName = orItemName;
	}

	@Column(name = "orItemNumber")
	public Integer getOrItemNumber() {
		return this.orItemNumber;
	}

	public void setOrItemNumber(Integer orItemNumber) {
		this.orItemNumber = orItemNumber;
	}

	@Column(name = "orInsuredValue")
	public Integer getOrInsuredValue() {
		return this.orInsuredValue;
	}

	public void setOrInsuredValue(Integer orInsuredValue) {
		this.orInsuredValue = orInsuredValue;
	}

	@Column(name = "orPostage")
	public Integer getOrPostage() {
		return this.orPostage;
	}

	public void setOrPostage(Integer orPostage) {
		this.orPostage = orPostage;
	}

	@Column(name = "orTotalCost")
	public Integer getOrTotalCost() {
		return this.orTotalCost;
	}

	public void setOrTotalCost(Integer orTotalCost) {
		this.orTotalCost = orTotalCost;
	}

	@Column(name = "orPaymentMethod")
	public String getOrPaymentMethod() {
		return this.orPaymentMethod;
	}

	public void setOrPaymentMethod(String orPaymentMethod) {
		this.orPaymentMethod = orPaymentMethod;
	}

	@Column(name = "orIssuanceDate")
	public String getOrIssuanceDate() {
		return this.orIssuanceDate;
	}

	public void setOrIssuanceDate(String orIssuanceDate) {
		this.orIssuanceDate = orIssuanceDate;
	}

	@Column(name = "orstates")
	public String getOrstates() {
		return this.orstates;
	}

	public void setOrstates(String orstates) {
		this.orstates = orstates;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "order")
	public Set<Cargoinformation> getCargoinformations() {
		return this.cargoinformations;
	}

	public void setCargoinformations(Set<Cargoinformation> cargoinformations) {
		this.cargoinformations = cargoinformations;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "order")
	public Set<Cargostatus> getCargostatuses() {
		return this.cargostatuses;
	}

	public void setCargostatuses(Set<Cargostatus> cargostatuses) {
		this.cargostatuses = cargostatuses;
	}

}
